<template>
  <div class="app-container">
    <div class="ProductionDynamic">
      <!-- 头部 -->
      <div class="ProductionDynamicHeader">
        <Find :OriginalFilter="{ static: true }" :formList="formList" @findClicked="findData" />
      </div>

      <!-- 主体 -->
      <div class="ProductionDynamicMain">
        <el-card class="ProductionDynamicMainCard" shadow="always" :body-style="{ padding: '0' }">
          <!-- card body -->
          <!-- 表格 -->
          <div class="ProductionDynamicMainCardMain">
            <div class="ProductionDynamicMainCardMainLeft">
              <h1 class="MainLeftCardH1">材料库存查询</h1>
              <Table :tableData="tableData" :tableHeader="tableHeader" :TableHeight="510" />
            </div>
            <div class="ProductionDynamicMainCardMainRight">
              <h1 class="MainLeftCardH1">指令明细</h1>
              <Table :tableData="tableData" :tableHeader="tableHeader1" :TableHeight="510" />
            </div>
            <div class="ProductionDynamicMainCardMainRightT">
              <div class="ProductionDynamicMainCardMainRightTDivOne">
                <h1 class="MainLeftCardH1">入库明细查询</h1>
                <Table :tableData="tableData" :tableHeader="tableHeader2" :TableHeight="210" />
              </div>
              <div class="ProductionDynamicMainCardMainRightTDivTwo">
                <h1 class="MainLeftCardH1">出库明细查询</h1>
                <Table :tableData="tableData" :tableHeader="tableHeader2" :TableHeight="221" />
              </div>
            </div>
          </div>

          <div class="ProductionDynamicMainCardBottom">
            <div style="display: flex">
              <el-form-item label="材料名称" style="font-size: 9px; height: 15px">
                <el-input style="width: 303px; height: 25px; margin-top: 5px" />
              </el-form-item>

              <el-form-item label="物料编码" style="font-size: 9px; height: 15px; margin-left: 30px">
                <el-input style="width: 303px; height: 25px; margin-top: 5px" />
              </el-form-item>
            </div>
            <div class="ProductionDynamicMainCardBottomBtn">
              <el-button style="background-color: #e7e7e7; width: 60px; color: #000000; border: none" type="info" size="small">保存</el-button>
              <el-button style="background-color: #f89027; width: 60px" type="warning" size="small">打印</el-button>
            </div>
          </div>
        </el-card>
      </div>
    </div>
  </div>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue'
import JMessage from '@/utils/JMessage'
export default defineComponent({
  name: 'MaterialInventory'
})
</script>
<script lang="ts" setup>
import { i18n, Jzhcn } from '@/i18n'
import Find from '@/components/Find/index.vue'
const formList = ref([
  {
    type: 'input',
    inputPlaceholder: '请输入物料编码',
    inputValue: ''
  },
  {
    type: 'input',
    inputPlaceholder: '请输入材料名称',
    inputValue: ''
  },
  {
    type: 'input',
    inputPlaceholder: '请输入材料颜色',
    inputValue: ''
  },
  {
    type: 'input',
    inputPlaceholder: '请输入材料名称',
    inputValue: ''
  },
  {
    type: 'date',
    dateLabel: '入库日期',
    dateValue: ''
  },
  {
    type: 'input',
    inputPlaceholder: '请输入指令',
    inputValue: ''
  },
  {
    type: 'input',
    inputPlaceholder: '请输入型体',
    inputValue: ''
  },
  {
    type: 'select',
    selectValue: '分类',
    selectLabel: '',
    selectOptions: [
      {
        optionKey: '1',
        optionValue: '111111',
        optionLabel: 'option1'
      },
      {
        optionKey: '2',
        optionValue: '222222',
        optionLabel: 'option2'
      },
      {
        optionKey: '3',
        optionValue: '333333',
        optionLabel: 'option3'
      }
    ]
  },
  {
    type: 'date',
    dateLabel: '发料日期',
    dateValue: ''
  },
  {
    type: 'checkbox',
    checkboxLabel: '大于0'
  },
  {
    type: 'checkbox',
    checkboxLabel: '小于0'
  },
  {
    type: 'checkbox',
    checkboxLabel: '全部'
  },
  {
    type: 'button',
    checkboxLabel: '置空',
    bgColor: '#1890FF'
  },
  {
    type: 'button',
    checkboxLabel: '导出'
  }
])
const findData = (data: any) => {
  console.log(data)
}
// 表格数据
const tableData = [
  {
    date: '20230427',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-02',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-04',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312',
    customer: 'jzy',
    checkboxArrange: true
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  }
]

const tableHeader = ref([
  {
    label: '材料颜色',
    prop: 'customer',
    width: '85px'
  },
  {
    label: '材料名称',
    prop: 'instruction',
    width: '173px'
  },
  {
    label: '规格',
    prop: 'shape',
    width: '85px'
  },
  {
    label: '单位',
    prop: 'shape',
    width: '85px'
  },
  {
    label: '入库日期',
    prop: 'shape',
    width: '85px'
  },
  {
    label: '发料日期',
    prop: 'shape',
    width: '85px'
  },
  {
    label: '入库数量',
    prop: 'shape',
    width: '85px'
  },
  {
    label: '发料数量',
    prop: 'shape',
    width: '85px'
  },
  {
    label: '库存数量',
    prop: 'shape',
    width: '85px'
  },
  {
    label: '库位',
    prop: 'shape',
    width: '85px'
  }
])

// 底部表格数据
const tableData1 = [
  {
    date: '20230427',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-02',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-04',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  }
]

const tableHeader1 = ref([
  {
    label: '指令',
    prop: 'customer',
    width: '77px'
  },
  {
    label: '型体',
    prop: 'instruction',
    width: '77px'
  },
  {
    label: '入库量',
    prop: 'instruction',
    width: '77px'
  },
  {
    label: '出库量',
    prop: 'instruction',
    width: '77px'
  }
])

// 底部表格数据
const tableData2 = [
  {
    date: '20230427',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-02',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-04',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  }
]

const tableHeader2 = ref([
  {
    label: '日期',
    prop: 'customer',
    width: '77px'
  },
  {
    label: '单据号码',
    prop: 'instruction',
    width: '77px'
  },
  {
    label: '单据类型',
    prop: 'instruction',
    width: '77px'
  },
  {
    label: '数量',
    prop: 'instruction',
    width: '77px'
  }
])
</script>

<style lang="less" scoped>
// 主体样式
.ProductionDynamicMain {
  width: 100%;
  height: 670px;
  margin-top: 20px;

  .ProductionDynamicMainCard {
    width: 100%;
    height: 100%;
    box-shadow: none;
  }
}

.ProductionDynamicMainCardMain {
  width: 98%;
  height: 600px;
  display: flex;
  margin: auto;

  .ProductionDynamicMainCardMainLeft {
    width: 60%;
    height: 100%;
  }

  .ProductionDynamicMainCardMainRight {
    width: 20%;
    height: 100%;
  }

  .ProductionDynamicMainCardMainRightT {
    width: 20%;
    height: 100%;
  }
}

.ProductionDynamicMainCardBottom {
  width: 98%;
  height: 110px;
  margin: auto;
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
}

.MainLeftCardH1 {
  font-size: 16px;
  margin: 10px 0 10px 0;
}

.ProductionDynamicMainCardBottomBtn {
  margin-top: 30px;
}

.ProductionDynamicMainCardMainRightTDivOne {
  width: 100%;
  height: 45%;
}

.ProductionDynamicMainCardMainRightTDivTwo {
  margin-top: 18px;
  width: 100%;
  height: 45%;
}
</style>
